//
//  DKAuthFaceFinishCell.m
//  DanKU
//
//  Created by 吴斌 on 2023/11/12.
//

#import "DKAuthFaceFinishCell.h"

static NSString * DKAuthFaceFinishCellId = @"DKAuthStartAuthenticationCellId";

@implementation DKAuthFaceFinishCell
+ (instancetype)authFaceFinishCell:(UITableView *)tableView{
    DKAuthFaceFinishCell * dk_AuthFaceFinishCell = [tableView dequeueReusableCellWithIdentifier:DKAuthFaceFinishCellId];
    if (!dk_AuthFaceFinishCell) {
        dk_AuthFaceFinishCell = [[DKAuthFaceFinishCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:DKAuthFaceFinishCellId];
    }
    dk_AuthFaceFinishCell.backgroundColor = [UIColor clearColor];
    dk_AuthFaceFinishCell.selectionStyle = UITableViewCellSelectionStyleNone;
    dk_AuthFaceFinishCell.accessoryType = UITableViewCellAccessoryNone;
    return dk_AuthFaceFinishCell;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self dk_addSubView];
    }
    return self;
}
- (void)dk_addSubView{
    UIButton * dk_NextBtn = [[UIButton alloc] init];
    [dk_NextBtn setTitle:@"Next" forState:UIControlStateNormal];
    [dk_NextBtn setTitleColor:DK_Hex(@"#FFFFFF") forState:UIControlStateNormal];
    dk_NextBtn.titleLabel.font = DK_FONT_Semibold(16);
    [dk_NextBtn setBackgroundImage:DK_GetImage(@"dk_registerNextSelectBg") forState:UIControlStateNormal];
    [dk_NextBtn addTarget:self action:@selector(goCheck) forControlEvents:UIControlEventTouchUpInside];
    [self.contentView addSubview:dk_NextBtn];
    [dk_NextBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(DK_IsWidthScale(30)));
        make.right.equalTo(@(-DK_IsWidthScale(30)));
        make.height.equalTo(@(DK_IsWidthScale(0)));
        make.bottom.equalTo(@(DK_IsWidthScale(0)));
    }];
}
- (void)goCheck{
    if(self.StartCardAuthBlock){
        self.StartCardAuthBlock();
    }
}
@end
